package com.springboot.cloud.sysapps.exam.rest;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.sysapps.exam.service.ISkillService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/skill")
@Api("skill")
@Slf4j
public class SkillController {
    @Autowired
    private ISkillService skillService;


    @ApiOperation(value = "根据moduleId获取所有技能点", notes = "根据moduleId获取所有技能点")
    @GetMapping("/all/{moduleId}")
    public Result allByModuleId(@PathVariable("moduleId") String moduleId){
        return Result.success(skillService.findByModuleId(moduleId));
    }
}
